package com.xiaodu.acer.phoneplay.di.module;

import com.xiaodu.acer.phoneplay.data.MainModel;
import com.xiaodu.acer.phoneplay.data.SearchModel;
import com.xiaodu.acer.phoneplay.data.http.ApiService;
import com.xiaodu.acer.phoneplay.di.FragmentScope;
import com.xiaodu.acer.phoneplay.presenter.contract.MainContract;
import com.xiaodu.acer.phoneplay.presenter.contract.SearchContract;

import dagger.Module;
import dagger.Provides;

/**
 * @author 小杜
 *         邮箱:m15701207383@163.com
 * @version V1.0
 * @Description: ${TODO}(用一句话描述该文件做什么)
 * @date 2018/1/9 15:07
 */
@Module
public class SearchModule {

    private SearchContract.View mView;

    public SearchModule(SearchContract.View view) {
        this.mView = view;
    }

    @FragmentScope
    @Provides
    public SearchContract.View providesView() {
        return mView;
    }

    @FragmentScope
    @Provides
    public SearchContract.Model provideModel(ApiService apiService){
        return  new SearchModel(apiService);
    }



}
